import http from "@/http"
import type { Commodity } from "@/types/commodity"

//搜索商品
export const getCommodityApi  = (parm:Commodity)=>{
    return http.post("/api/commodity/get",parm)
}
//添加商品
export const addCommodityApi  = (parm:Commodity)=>{
    return http.post("/api/commodity/add",parm)
}
//删除商品
export const deleteCommodityApi = (parm:Commodity)=>{
    return http.post("/api/commodity/delete",parm)
}
//修改商品
export const updateCommodityApi = (parm:Commodity)=>{
    return http.post("/api/commodity/update",parm)
}



//管理员分页查询商品
export const AdgetCommodityApi  = (parm:any)=>{
    return http.post("/api/commodity/adget",parm)
}
